package model;

import modelInterfaces.IObject;
import java.lang.Object;
import modelInterfaces.IPrediction;

/**
 * 
 * Represents prediction done by a recommendation algorithm
 * @see IPrediction
 *
 */
public class Prediction implements IPrediction{
	
	/** Object associated to the prediction*/
	private IObject object;
	
	/** Prediction value */
	private float value;
	
	@Override
	public IObject getObject() {
		return object;
	}
	
	@Override
	public void setObject(IObject object) {
		this.object = object;
	}
	
	@Override
	public float getValue() {
		return value;
	}
	
	@Override
	public void setValue(float value) {
		this.value = value;
	}
	
	@Override
	public boolean equals(Object o) {
	    if (!(o instanceof IPrediction)) {
	      return false;
	    }
	    IPrediction other = (IPrediction) o;
	    return (object.equals(other.getObject()));
	}
}
